import request from '@/utils/request'
// 配置管理
const api = {
  uploadImg: '/api/upload/encryption/v1/file', // 图片上传
  commonUploadImg: '/configurationManagement/v1/upload-file', // 图片上传 投资项目
  // 投资项目
  investorsList: '/configurationManagement/encryption/v1/list',
  investorsListDetail: '/configurationManagement/encryption/v1/getDetail',
  investorsListUpdateStatusById: '/configurationManagement/encryption/v1/updateStatusById',
  investorsListUpdateById: '/configurationManagement/encryption/v1/updateById',
  investorsListGetById: '/configurationManagement/encryption/v1/getById',
  investorsListAdd: '/configurationManagement/encryption/v1/add',
  // 团队管理
  teamManagementList: '/api/team-manage/encryption/v1/list',
  teamManagementDetail: '/api/team-manage/encryption/v1/details',
  teamManagementAdd: '/api/team-manage/encryption/v1/save',
  teamManagementEdit: '/api/team-manage/encryption/v1/update',
  // VIP会员配置
  VipMemberListDetail: '/api/memberLevel/encryption/v1/detail',
  VipMemberList: '/api/memberLevel/encryption/v1/list',
  VipMemberListAdd: '/api/memberLevel/encryption/v1/save',
  VipMemberListEdit: '/api/memberLevel/encryption/v1/update',
  // 公告配置
  bulletinListDetail: '/api/conf-proclamation/encryption/v1/detail',
  bulletinList: '/api/conf-proclamation/encryption/v1/list',
  bulletinListAdd: '/api/conf-proclamation/encryption/v1/save',
  bulletinListEdit: '/api/conf-proclamation/encryption/v1/update',
}

export default api
// 图片文件上传
export function uploadImg(parameter) {
  return request({
    url: api.uploadImg,
    method: 'post',
    data: parameter,
  })
}
// 图片文件上传
export function commonUploadImg(parameter) {
  return request({
    url: api.commonUploadImg,
    method: 'post',
    data: parameter,
  })
}
// 投资项目
// 投资项目-配置列表
export function investorsList(parameter) {
  return request({
    url: api.investorsList,
    method: 'post',
    data: parameter,
  })
}
// 投资项目-配置查看详情
export function investorsListDetail(parameter) {
  return request({
    url: api.investorsListDetail,
    method: 'post',
    data: parameter,
  })
}
// 投资项目-投资项目新增
export function investorsListAdd(parameter) {
  return request({
    url: api.investorsListAdd,
    method: 'post',
    data: parameter,
  })
}
// 投资项目-开启或关闭项目状态
export function investorsListUpdateStatusById(parameter) {
  return request({
    url: api.investorsListUpdateStatusById,
    method: 'post',
    data: parameter,
  })
}
// 投资项目-投资项目信息更新
export function investorsListUpdateById(parameter) {
  return request({
    url: api.investorsListUpdateById,
    method: 'post',
    data: parameter,
  })
}
// 投资项目-投资项目信息-编辑前获取详情
export function investorsListGetById(parameter) {
  return request({
    url: api.investorsListGetById,
    method: 'post',
    data: parameter,
  })
}

/*
 * 团队管理
 */
// 团队列表
export function teamManagementList(parameter) {
  return request({
    url: api.teamManagementList,
    method: 'post',
    data: parameter,
  })
}
// 团队详情
export function teamManagementDetail(parameter) {
  return request({
    url: api.teamManagementDetail,
    method: 'post',
    data: parameter,
  })
}
// 新增团队
export function teamManagementAdd(parameter) {
  return request({
    url: api.teamManagementAdd,
    method: 'post',
    data: parameter,
  })
}
// 修改团队
export function teamManagementEdit(parameter) {
  return request({
    url: api.teamManagementEdit,
    method: 'post',
    data: parameter,
  })
}
/**
 *
 * @param {*} parameter
 * @returns   VIP会员配置
 */
// 会员等级详情
export function VipMemberListDetail(parameter) {
  return request({
    url: api.VipMemberListDetail,
    method: 'post',
    data: parameter,
  })
}
// 会员等级列表
export function VipMemberList(parameter) {
  return request({
    url: api.VipMemberList,
    method: 'post',
    data: parameter,
  })
}
// 会员等级新增
export function VipMemberListAdd(parameter) {
  return request({
    url: api.VipMemberListAdd,
    method: 'post',
    data: parameter,
  })
}
// 会员等级修改
export function VipMemberListEdit(parameter) {
  return request({
    url: api.VipMemberListEdit,
    method: 'post',
    data: parameter,
  })
}
/**
 *
 * @param {*} parameter
 * @returns   公告配置
 */
// 会员等级详情
export function bulletinListDetail(parameter) {
  return request({
    url: api.bulletinListDetail,
    method: 'post',
    data: parameter,
  })
}
// 会员等级列表
export function bulletinList(parameter) {
  return request({
    url: api.bulletinList,
    method: 'post',
    data: parameter,
  })
}
// 会员等级新增
export function bulletinListAdd(parameter) {
  return request({
    url: api.bulletinListAdd,
    method: 'post',
    data: parameter,
  })
}
// 会员等级修改
export function bulletinListEdit(parameter) {
  return request({
    url: api.bulletinListEdit,
    method: 'post',
    data: parameter,
  })
}
